﻿using Microsoft.Practices.Composite.Events;

namespace YourWorld.Common.Infrastucture.Events
{
    public static class EventService
    {
        private static EventAggregator eventAggregator = null;
        private static object _syncRoot = new object();

        public static EventAggregator Aggregator
        {
            get
            {
                lock ( _syncRoot )
                {
                    if ( null == eventAggregator )
                    {
                        eventAggregator = new EventAggregator();
                    }
                    return eventAggregator;
                }
            }
        }
    }
}
